import Vue from 'vue'
import hztechUI from 'hztech-ui'
import 'hztech-ui/src/theme/index.scss'
import 'element-ui/lib/theme-chalk/index.css';
import innerComponents from './components/inner/index'
import demoComponents from './components/demos/index'

function globalRegisterComopnent(componentsObj) {
  Object.keys(componentsObj).forEach(componentName => {
    const component = componentsObj[componentName]
    Vue.component(component.alias, component)
  })
}

globalRegisterComopnent(innerComponents)
globalRegisterComopnent(demoComponents)

export default ({ Vue, options, router, siteData, isServer }) => {
  Vue.use(hztechUI, {
    locale: 'zh-CN'
  })
};
